package com.hnucm.onlinealgstudy.service;

import com.hnucm.onlinealgstudy.dao.AlgorithmMapper;
import com.hnucm.onlinealgstudy.pojo.Recommend;
import com.hnucm.onlinealgstudy.pojo.StudiedAlg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AlgorithmServiceImpl implements AlgorithmService{
    @Autowired
    AlgorithmMapper algorithmMapper;

    @Override
    public List<Recommend> getRecommendedList() {
        return algorithmMapper.getRecommendedList();
    }

    @Override
    public void addViewNum(Integer id) {
        algorithmMapper.addViewNum(id);
    }

    @Override
    public void addStudiedAlg(StudiedAlg studiedAlg) {
        algorithmMapper.addStudiedAlg(studiedAlg);
    }

    @Override
    public List<StudiedAlg> getStudiedAlgList(String user_name) {
        return algorithmMapper.getStudiedAlgList(user_name);
    }
}
